.class public Lcom/android/inputmethod/latin/LatinKeyboard;
.super Landroid/inputmethodservice/Keyboard;
.source "LatinKeyboard.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;
    }
.end annotation


# static fields
.field private static final SHIFT_LOCKED:I = 0x2

.field private static final SHIFT_OFF:I = 0x0

.field private static final SHIFT_ON:I = 0x1

.field static sSpacebarVerticalCorrection:I


# instance fields
.field private mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

.field private mOldShiftIcon:Landroid/graphics/drawable/Drawable;

.field private mOldShiftPreviewIcon:Landroid/graphics/drawable/Drawable;

.field private mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

.field private mShiftLockIcon:Landroid/graphics/drawable/Drawable;

.field private mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

.field private mShiftState:I


# direct methods
.method public constructor <init>(Landroid/content/Context;I)V
    .locals 1
    .parameter "context"
    .parameter "xmlLayoutResId"

    .prologue
    .line 44
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/android/inputmethod/latin/LatinKeyboard;-><init>(Landroid/content/Context;II)V

    .line 45
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;II)V
    .locals 5
    .parameter "context"
    .parameter "xmlLayoutResId"
    .parameter "mode"

    .prologue
    const/4 v4, 0x0

    .line 48
    invoke-direct {p0, p1, p2, p3}, Landroid/inputmethodservice/Keyboard;-><init>(Landroid/content/Context;II)V

    .line 39
    iput v4, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 49
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    .line 50
    .local v0, res:Landroid/content/res/Resources;
    const v1, 0x7f020058

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    .line 51
    const v1, 0x7f020044

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    .line 52
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v2

    iget-object v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockPreviewIcon:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v3}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v3

    invoke-virtual {v1, v4, v4, v2, v3}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 55
    const v1, 0x7f090003

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelOffset(I)I

    move-result v1

    sput v1, Lcom/android/inputmethod/latin/LatinKeyboard;->sSpacebarVerticalCorrection:I

    .line 57
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;ILjava/lang/CharSequence;II)V
    .locals 1
    .parameter "context"
    .parameter "layoutTemplateResId"
    .parameter "characters"
    .parameter "columns"
    .parameter "horizontalPadding"

    .prologue
    .line 61
    invoke-direct/range {p0 .. p5}, Landroid/inputmethodservice/Keyboard;-><init>(Landroid/content/Context;ILjava/lang/CharSequence;II)V

    .line 39
    const/4 v0, 0x0

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 62
    return-void
.end method


# virtual methods
.method protected createKeyFromXml(Landroid/content/res/Resources;Landroid/inputmethodservice/Keyboard$Row;IILandroid/content/res/XmlResourceParser;)Landroid/inputmethodservice/Keyboard$Key;
    .locals 6
    .parameter "res"
    .parameter "parent"
    .parameter "x"
    .parameter "y"
    .parameter "parser"

    .prologue
    .line 67
    new-instance v0, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;

    move-object v1, p1

    move-object v2, p2

    move v3, p3

    move v4, p4

    move-object v5, p5

    invoke-direct/range {v0 .. v5}, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;-><init>(Landroid/content/res/Resources;Landroid/inputmethodservice/Keyboard$Row;IILandroid/content/res/XmlResourceParser;)V

    .line 68
    .local v0, key:Landroid/inputmethodservice/Keyboard$Key;
    iget-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->codes:[I

    const/4 v2, 0x0

    aget v1, v1, v2

    const/16 v2, 0xa

    if-ne v1, v2, :cond_0

    .line 69
    iput-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    .line 71
    :cond_0
    return-object v0
.end method

.method enableShiftLock()V
    .locals 2

    .prologue
    .line 134
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getShiftKeyIndex()I

    move-result v0

    .line 135
    .local v0, index:I
    if-ltz v0, :cond_1

    .line 136
    invoke-virtual {p0}, Lcom/android/inputmethod/latin/LatinKeyboard;->getKeys()Ljava/util/List;

    move-result-object v1

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/inputmethodservice/Keyboard$Key;

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    .line 137
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    instance-of v1, v1, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;

    if-eqz v1, :cond_0

    .line 138
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    check-cast v1, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;

    invoke-virtual {v1}, Lcom/android/inputmethod/latin/LatinKeyboard$LatinKey;->enableShiftLock()V

    .line 140
    :cond_0
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, v1, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mOldShiftIcon:Landroid/graphics/drawable/Drawable;

    .line 141
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, v1, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    iput-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mOldShiftPreviewIcon:Landroid/graphics/drawable/Drawable;

    .line 143
    :cond_1
    return-void
.end method

.method isShiftLocked()Z
    .locals 2

    .prologue
    .line 160
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public isShifted()Z
    .locals 1

    .prologue
    .line 187
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_1

    .line 188
    iget v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    .line 190
    :goto_0
    return v0

    .line 188
    :cond_0
    const/4 v0, 0x0

    goto :goto_0

    .line 190
    :cond_1
    invoke-super {p0}, Landroid/inputmethodservice/Keyboard;->isShifted()Z

    move-result v0

    goto :goto_0
.end method

.method setImeOptions(Landroid/content/res/Resources;II)V
    .locals 4
    .parameter "res"
    .parameter "mode"
    .parameter "options"

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x0

    .line 75
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_0

    .line 77
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->popupCharacters:Ljava/lang/CharSequence;

    .line 78
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput v3, v0, Landroid/inputmethodservice/Keyboard$Key;->popupResId:I

    .line 79
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->text:Ljava/lang/CharSequence;

    .line 80
    const v0, 0x400000ff

    and-int/2addr v0, p3

    packed-switch v0, :pswitch_data_0

    .line 109
    const/4 v0, 0x6

    if-ne p2, v0, :cond_1

    .line 110
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 111
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 112
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const-string v1, ":-)"

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    .line 113
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const-string v1, ":-) "

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->text:Ljava/lang/CharSequence;

    .line 114
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f04000b

    iput v1, v0, Landroid/inputmethodservice/Keyboard$Key;->popupResId:I

    .line 125
    :goto_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v0, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    if-eqz v0, :cond_0

    .line 126
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v0, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, v1, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v1}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v1

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v2, v2, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v2

    invoke-virtual {v0, v3, v3, v1, v2}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 131
    :cond_0
    return-void

    .line 82
    :pswitch_0
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 83
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 84
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a003d

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 87
    :pswitch_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 88
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 89
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a003e

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 92
    :pswitch_2
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 93
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 94
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a003f

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 97
    :pswitch_3
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f020042

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 99
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f020056

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 101
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto :goto_0

    .line 104
    :pswitch_4
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 105
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 106
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f0a0040

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto/16 :goto_0

    .line 116
    :cond_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f020041

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->iconPreview:Landroid/graphics/drawable/Drawable;

    .line 118
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    const v1, 0x7f020055

    invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 120
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mEnterKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-object v2, v0, Landroid/inputmethodservice/Keyboard$Key;->label:Ljava/lang/CharSequence;

    goto/16 :goto_0

    .line 80
    nop

    :pswitch_data_0
    .packed-switch 0x2
        :pswitch_0
        :pswitch_3
        :pswitch_4
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method setShiftLocked(Z)V
    .locals 3
    .parameter "shiftLocked"

    .prologue
    const/4 v2, 0x1

    .line 146
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v0, :cond_0

    .line 147
    if-eqz p1, :cond_1

    .line 148
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-boolean v2, v0, Landroid/inputmethodservice/Keyboard$Key;->on:Z

    .line 149
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 150
    const/4 v0, 0x2

    iput v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 157
    :cond_0
    :goto_0
    return-void

    .line 152
    :cond_1
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    const/4 v1, 0x0

    iput-boolean v1, v0, Landroid/inputmethodservice/Keyboard$Key;->on:Z

    .line 153
    iget-object v0, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    iput-object v1, v0, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    .line 154
    iput v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    goto :goto_0
.end method

.method public setShifted(Z)Z
    .locals 4
    .parameter "shiftState"

    .prologue
    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 165
    const/4 v0, 0x0

    .line 166
    .local v0, shiftChanged:Z
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    if-eqz v1, :cond_4

    .line 167
    if-nez p1, :cond_2

    .line 168
    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-eqz v1, :cond_1

    move v0, v3

    .line 169
    :goto_0
    iput v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 170
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iput-boolean v2, v1, Landroid/inputmethodservice/Keyboard$Key;->on:Z

    .line 171
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mOldShiftIcon:Landroid/graphics/drawable/Drawable;

    iput-object v2, v1, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    :cond_0
    :goto_1
    move v1, v0

    .line 182
    :goto_2
    return v1

    :cond_1
    move v0, v2

    .line 168
    goto :goto_0

    .line 173
    :cond_2
    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-nez v1, :cond_0

    .line 174
    iget v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    if-nez v1, :cond_3

    move v0, v3

    .line 175
    :goto_3
    iput v3, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftState:I

    .line 176
    iget-object v1, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftKey:Landroid/inputmethodservice/Keyboard$Key;

    iget-object v2, p0, Lcom/android/inputmethod/latin/LatinKeyboard;->mShiftLockIcon:Landroid/graphics/drawable/Drawable;

    iput-object v2, v1, Landroid/inputmethodservice/Keyboard$Key;->icon:Landroid/graphics/drawable/Drawable;

    goto :goto_1

    :cond_3
    move v0, v2

    .line 174
    goto :goto_3

    .line 180
    :cond_4
    invoke-super {p0, p1}, Landroid/inputmethodservice/Keyboard;->setShifted(Z)Z

    move-result v1

    goto :goto_2
.end method
